package com.snow.useviewdemo.function.chat;

import android.os.Bundle;
import android.view.View;

import com.snow.useviewdemo.R;
import com.snow.useviewdemo.base.BaseKtActivity;
import com.snow.useviewdemo.databinding.ActChatBinding;

import org.jetbrains.annotations.NotNull;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * author : zyt
 * e-mail : 632105276@qq.com
 * date   : 2020-01-08
 * desc   : 仿微信聊天页面，包括键盘谈起
 */
public class ChatActivity extends BaseKtActivity<ActChatBinding> {
    @Override
    protected void setViewData(Bundle savedInstanceState) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.iv_emoticons_normal, R.id.iv_emoticons_checked})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_emoticons_normal:
                // 点击显示表情框
                getBinding().more.setVisibility(View.VISIBLE);
                getBinding().ivEmoticonsNormal.setVisibility(View.INVISIBLE);
                getBinding().ivEmoticonsChecked.setVisibility(View.VISIBLE);
                break;
            case R.id.iv_emoticons_checked:// 点击隐藏表情框
                getBinding().ivEmoticonsChecked.setVisibility(View.INVISIBLE);
                getBinding().more.setVisibility(View.GONE);
                break;
        }
    }

    @NotNull
    @Override
    protected ActChatBinding getViewBinding() {
        return ActChatBinding.inflate(getLayoutInflater());
    }
}
